package hu.rsc.feeds.client.dnd;

public class Position {
    private int row = 0;
    private int col = 0;

    public Position(int row, int col) {
	this.row = row;
	this.col = col;
    }

    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (obj == null) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	Position other = (Position) obj;
	if (this.col != other.col) {
	    return false;
	}
	if (this.row != other.row) {
	    return false;
	}
	return true;
    }

    public int getCol() {
	return this.col;
    }

    public int getRow() {
	return this.row;
    }

    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + this.col;
	result = prime * result + this.row;
	return result;
    }

    public void setCol(int col) {
	this.col = col;
    }

    public void setRow(int row) {
	this.row = row;
    }

}
